package com.mxpio.erp.common.purchase.entity;


import com.mxpio.erp.common.jpa.model.Order;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_PURC_AO")
@ApiModel(value="验收单")
public class AcceptanceOrder extends Order {

	private static final long serialVersionUID = 1L;

	@ApiModelProperty(value = "采购单号")
    @Column(name = "PURCHASE_BIZ_NO_")
    private String purchaseBizNo;

    @Column(name = "ITEM_CODE_")
    @ApiModelProperty(value = "物料编码")
    private String itemCode ;

    @Column(name = "ITEM_NAME_")
    @ApiModelProperty(value = "物料名称")
    private String itemName ;

    @Column(name = "ITEM_SPEC_")
    @ApiModelProperty(value = "规格型号")
    private String itemSpec ;

    @Column(name = "UNIT_CODE_")
    @ApiModelProperty(value = "单位编号")
    private String unitCode;

    @Column(name = "MATERIAL_STANDARD_")
    @ApiModelProperty(value = "材料标准")
    private String materialStandard ;

    @Column(name = "MATERIAL_MARK_")
    @ApiModelProperty(value = "材料牌号")
    private String materialMark ;

    @Column(name = "ACCEPTANCE_QUANTITY_")
    @ApiModelProperty(value = "验收数量")
    private BigDecimal acceptanceQuantity;

    @Column(name = "QUALIFIED_QUANTITY_")
    @ApiModelProperty(value = "合格数量")
    private BigDecimal qualifiedQuantity;

    @Column(name = "UNQUALIFIED_QUANTITY_")
    @ApiModelProperty(value = "不合格数量")
    private BigDecimal unqualifiedQuantity;

    @Column(name = "BATCH_")
    @ApiModelProperty(value = "入场批次")
    private String batch ;

    @Column(name = "BATCH_NUMBER_")
    @ApiModelProperty(value = "验收批号")
    private String batchNumber ;

    @ApiModelProperty(value = "供应商编号")
    @Column(name = "SUPPLIER_CODE_")
    private String supplierCode;

    @ApiModelProperty(value = "供应商名称")
    @Column(name = "SUPPLIER_NAME_")
    private String supplierName;

    @Column(name = "SUPPLIER_BATCH_")
    @ApiModelProperty(value = "厂家批次号/炉批号")
    private String supplierBatch ;

    @Column(name = "ACCEPTANCE_RESULT_")
    @ApiModelProperty(value = "检验结论")
    private String acceptanceResult ;

    @Column(name = "TECHNOLOGY_AGREEMENT_")
    @ApiModelProperty(value = "技术协议")
    private String technologyAgreement ;

    @ApiModelProperty(value = "备注")
    @Column(name = "MEMO_")
    private String memo;

    @ApiModelProperty(value = "附件")
    @Column(name = "ATTACH_")
    private String attach;

    @Column(name = "ACCEPTANCE_USER_")
    @ApiModelProperty(value = "验收人")
    private String acceptanceUser ;

    @Column(name = "ACCEPTANCE_DATE_")
    @ApiModelProperty(value = "验收日期")
    private Date acceptanceDate ;

    @Override
    public String initTypeCode() {
        return "AO1";
    }
}
